package com.springboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public @ResponseBody class HelloController {
    //Environment可以获取properties中的所有信息
    @Autowired
    private Environment environment;
    @RequestMapping("/hello")
    public String hello(){
        return "helloworld";
    }
}
